package com.kehutong.contact.entity;

import org.coraframework.bean.valid.CheckField;
import org.coraframework.orm.Entity;
import org.coraframework.orm.annotation.Column;
import org.coraframework.orm.annotation.Table;

import com.kehutong.common.enums.Gender;
import com.kehutong.contact.enums.RelationType;

@Table(value = "t_resident_family", comment = "住户家庭成员", multi = true)
public class ResidentFamily extends Entity {

    private static final long serialVersionUID = -1;

    protected ResidentFamily(String id) {
        super(id);
    }

    @CheckField("住户编号不能为空")
    @Column(comment = "住户编号")
    private String residentNo;

    @CheckField("姓名不能为空")
    @Column(comment = "姓名")
    private String name;

    @Column(comment = "手机")
    private String mobile;

    @Column(comment = "性别")
    private Gender gender;

    @Column(comment = "身份证")
    private String cardNo;

    @Column(comment = "和住户关系")
        private RelationType type;

    @Column(comment = "逻辑删除")
    private boolean deleted;

    public String getResidentNo() {
        return residentNo;
    }

    public void setResidentNo(String residentNo) {
        this.residentNo = residentNo;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public Gender getGender() {
        return gender;
    }

    public void setGender(Gender gender) {
        this.gender = gender;
    }

    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    public RelationType getType() {
        return type;
    }

    public void setType(RelationType type) {
        this.type = type;
    }

    public boolean isDeleted() {
        return deleted;
    }

    public void setDeleted(boolean deleted) {
        this.deleted = deleted;
    }
}
